
#pragma once
#include <TColgp_HArray1OfPnt.hxx>
#include <TFunction_Logbook.hxx>
#include <TDF_Label.hxx>
#include <gp_Pnt.hxx>
#include <gp_Dir.hxx>
#include <Standard_TypeDef.hxx>
class TDF_Label;
class gp_Pnt;
class TopoDS_Shape;

class GEOMDBAPI LabelTools
{
private:
	LabelTools();
public:
	
	static bool GetChild(const TDF_Label& Label,UINT nIndex, gp_Pnt& point, TDF_Label& subLabel);
    static bool GetChild(const TDF_Label& Label,CString& value, TDF_Label& subLabel);
    static bool GetChild(const TDF_Label& Label,UINT nIndex, Standard_Real& value, TDF_Label& subLabel);
    static bool GetChild(const TDF_Label& Label,UINT nFirstIndex, gp_Dir& dir, TDF_Label& subLabel);
    static bool GetChild(const TDF_Label& Label,UINT nIndex, TopoDS_Shape& value, TDF_Label& subLabel);
	
	static void SetChild(TDF_Label& Label, UINT nIndex, const Handle(TColgp_HArray1OfPnt)& value); 
	static bool GetChild(const TDF_Label& Label,UINT nIndex, Handle(TColgp_HArray1OfPnt)& value, 
						  TDF_Label& subLabel, int nUpper);
	
	static void SetChild(TDF_Label& Label, UINT nIndex, Standard_Integer value);
	static bool GetChild(const TDF_Label& Label,UINT nIndex, Standard_Integer& value, TDF_Label& subLabel);
	
	static bool UpdateChild(const TDF_Label& Label,UINT nIndex,gp_Pnt& point,TFunction_Logbook& log);
	static bool UpdateChild(const TDF_Label& Label,UINT nIndex,int nPointCount,TFunction_Logbook& log);
	static bool UpdateChild(const TDF_Label& Label,UINT nIndex,TopoDS_Shape pShape, TFunction_Logbook& log);
	static bool UpdateChild(const TDF_Label& label,UINT nIndex,gp_Dir& di,TFunction_Logbook& log);
	static bool v();

	// Real
	static void SetChild(TDF_Label& Label, UINT nIndex, Standard_Real value);
	static bool GetChild(const TDF_Label& Label,UINT nIndex,Standard_Real& value);

	// Point
	static void SetChild(TDF_Label& Label, UINT nIndex, const gp_Pnt& point);
	static bool GetChild(const TDF_Label& Label,UINT nIndex, gp_Pnt& point);

	// vector
	static void SetChild(TDF_Label& Label, UINT nIndex, const gp_Dir& dir);
	static bool GetChild(const TDF_Label& Label,UINT nIndex, gp_Dir& dir);

	// shape
	static void SetChild(TDF_Label& Label, UINT nIndex, const TopoDS_Shape& value);
	static bool GetChild(const TDF_Label& Label,UINT nIndex, TopoDS_Shape& value);

};

